<?php
require_once PATH_STRINGPARSER_BBCODE . '/stringparser_bbcode.class.php';

class ZFKiller_Markup_BBCode extends StringParser_BBCode {
	
	public function clearBBCode($text) {
		return preg_replace('#\[(.*?)\]#si', '', $text);
	}
	
	public function prepareTextPlain($textplain) {
		// Separar em paragrafos
		$textplain = '[p]' . preg_replace('#[\n\r]+#', "[/p]\n[p]", $textplain) . '[/p]';
		
		return $textplain;
	}
	
	public function render($text) {
		return $this->parse($text);
	}
}